import { _decorator, __private } from 'cc';
import { DIRECTION_ENUM, PARAME_NAME_ENUM } from "../../Enums/index"
import { PlayerStateMachine } from './PlayerStateMachine';
import { EntityManager } from '../Base/EntityManager';
const { ccclass } = _decorator;
@ccclass('PlayManager')
export class PlayManager extends EntityManager {

    async init(list, direction = DIRECTION_ENUM.BOTTOM, state = PARAME_NAME_ENUM.IDLE) {
        this.fsm = this.addComponent(PlayerStateMachine)
        super.init({
            state,
            fsm: PlayerStateMachine,
            frameList: list,
            direction
        })
    }
}


